package user

import (
	"crmeb-common/global"
	"math/big"
	"time"
)

// User 用户表
type User struct {
	global.BaseModel
	Account string `json:"account" gorm:"column=account;comment:用户账号"`

	Pwd string `json:"pwd" gorm:"column=pwd;comment:用户密码"`

	RealName string `json:"realName" gorm:"column=real_name;comment:真实姓名"`

	Birthday string `json:"birthday" gorm:"column=birthday;comment:生日"`

	IdentityCardNo string `json:"identityCardNo" gorm:"column=identity_card_no;comment:身份证号码"`

	TagId string `json:"tagId" gorm:"column=tag_id;comment:标签id,英文逗号分隔"`

	Nickname string `json:"nickname" gorm:"column=nickname;comment:用户昵称"`

	Avatar string `json:"avatar" gorm:"column=avatar;comment:用户头像"`

	Phone string `json:"phone" gorm:"column=phone;comment:手机号码"`

	Country string `json:"country" gorm:"column=country;comment:国家，中国CN，其他OTHER"`

	Province string `json:"province" gorm:"column=province;comment:省份"`

	City string `json:"city" gorm:"column=city;comment:城市"`

	District string `json:"district" gorm:"column=district;comment:区"`

	Address string `json:"address" gorm:"column=address;comment:详细地址"`

	Sex int32 `json:"sex" gorm:"column=sex;comment:性别，0未知，1男，2女，3保密"`

	Integral int32 `json:"integral" gorm:"column=integral;comment:用户积分"`

	Experience int32 `json:"experience" gorm:"column=experience;comment:用户经验"`

	NowMoney big.Float `json:"nowMoney" gorm:"column=now_money;comment:用户余额"`

	BrokeragePrice big.Float `json:"brokeragePrice" gorm:"column=brokerage_price;comment:佣金金额"`

	Level int32 `json:"level" gorm:"column=level;comment:等级"`

	SignNum int32 `json:"signNum" gorm:"column=sign_num;comment:连续签到天数"`

	IsWechatPublic bool `json:"isWechatPublic" gorm:"column=is_wechat_public;comment:是否关联公众号"`

	IsWechatRoutine bool `json:"isWechatRoutine" gorm:"column=is_wechat_routine;comment:是否关联小程序"`

	IsWechatIos bool `json:"isWechatIos" gorm:"column=is_wechat_ios;comment:是否关联微信ios"`

	IsWechatAndroid bool `json:"isWechatAndroid" gorm:"column=is_wechat_android;comment:是否关联微信android"`

	IsBindingIos bool `json:"isBindingIos" gorm:"column=is_binding_ios;comment:是否关联ios"`

	PayCount int32 `json:"payCount" gorm:"column=pay_count;comment:用户购买次数"`

	IsPromoter bool `json:"isPromoter" gorm:"column=is_promoter;comment:是否为推广员"`

	PromoterTime time.Time `json:"promoterTime" gorm:"column=promoter_time;comment:成为分销员时间"`

	SpreadUid int32 `json:"spreadUid" gorm:"column=spread_uid;comment:上级推广员id"`

	SpreadTime time.Time `json:"spreadTime" gorm:"column=spread_time;comment:绑定上级推广员时间"`

	SpreadCount int32 `json:"spreadCount" gorm:"column=spread_count;comment:下级人数"`

	RegisterType string `json:"registerType" gorm:"column=register_type;comment:注册类型：wechat-公众号，routine-小程序，H5-H5,iosWx-微信ios，androidWx-微信安卓，ios-ios"`

	AddIp string `json:"addIp" gorm:"column=add_ip;comment:创建ip"`

	LastIp string `json:"lastIp" gorm:"column=last_ip;comment:最后一次登录ip"`

	LastLoginTime time.Time `json:"lastLoginTime" gorm:"column=last_login_time;comment:最后一次登录时间"`

	Status bool `json:"status" gorm:"column=status;comment:1为正常，0为禁止"`

	Mark string `json:"mark" gorm:"column=mark;comment:备注"`

	IsLogoff bool `json:"isLogoff" gorm:"column=is_logoff;comment:是否注销"`

	LogoffTime time.Time `json:"logoffTime" gorm:"column=logoff_time;comment:注销时间"`

	Signature string `json:"signature" gorm:"column=signature;comment:用户签名"`
}
